<?php 
use mdm\admin\components\MenuHelper;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name=csrf-param content="test" >
<meta name=csrf-token content="123131313131" >
<title> 海威后台管理</title>

<link href="/dwz/themes/default/style.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="/dwz/themes/css/core.css" rel="stylesheet" type="text/css" media="screen"/>
<script src="/dwz/js/jquery-1.7.2.js" type="text/javascript"></script>
<script src="/dwz/js/jquery.cookie.js" type="text/javascript"></script>
<script src="/dwz/js/dwz.core.js" type="text/javascript"></script>
<script src="/dwz/js/dwz.barDrag.js" type="text/javascript"></script>
<script src="/dwz/js/dwz.tree.js" type="text/javascript"></script>
<script src="/dwz/js/dwz.accordion.js" type="text/javascript"></script>
<script src="/dwz/js/dwz.theme.js" type="text/javascript"></script>
<script src="/dwz/js/dwz.contextmenu.js" type="text/javascript"></script>
<script src="/dwz/js/dwz.navTab.js" type="text/javascript"></script>
<script src="/dwz/js/dwz.tab.js" type="text/javascript"></script>
<script src="/dwz/js/dwz.ui.js" type="text/javascript"></script>
<script src="/dwz/js/dwz.cssTable.js" type="text/javascript"></script>
<script src="/dwz/js/dwz.stable.js" type="text/javascript"></script>
<script src="/dwz/js/dwz.panel.js" type="text/javascript"></script>
<script src="/dwz/js/dwz.checkbox.js" type="text/javascript"></script>

<script type="text/javascript">
$(function(){
	DWZ.init("/dwz/dwz.frag.xml", {
		loginUrl:"login_dialog.html", loginTitle:"登录",	// 弹出登录对话框
//		loginUrl:"login.html",	// 跳到登录页面
		statusCode:{ok:200, error:300, timeout:301}, //【可选】
		pageInfo:{pageNum:"pageNum", numPerPage:"numPerPage", orderField:"orderField", orderDirection:"orderDirection"}, //【可选】
		debug:false,	// 调试模式 【true|false】
		callback:function(){
			initEnv();
			$("#themeList").theme({themeBase:"/dwz/themes"}); // themeBase 相对于index页面的主题base路径
		}
	});

	$.ajax({
        url:'/sys-notice/no-read',
        type:'get',
        dataType:'json',
        data:{},
        success:function (res) {
        	localStorage.noread = res.noread
        	$('#notice').html(res.noread);
        }
	})
});

setInterval("noread()",1000);
function noread(){
	$('#notice').html(sessionStorage.noread);
}
</script>
</head>

<body scroll="no">
	<div id="layout">
            <div id="header">
                    <div class="headerNav">
                            <!-- <a class="logo" href="#">标志</a> -->
                            <ul class="nav">
                                <li id="on_read"><a href="/sys-notice/index" target="navTab" external="true" ><span id="notice"></span></a></li>
                                <li><a href="#" target="_blank"></a></li>
                                <li><a href="" target="_blank">欢迎您：<?php echo \Yii::$app->user->name;?></a></li>
                                <li><a href=<?=f_url(['site/logout',]) ?>>退出</a></li>
                            </ul>
                            <ul class="themeList" id="themeList">
                                    <li theme="default"><div class="selected">蓝色</div></li>
                                    <li theme="green"><div>绿色</div></li>
                                    <li theme="purple"><div>紫色</div></li>
                                    <li theme="silver"><div>银色</div></li>
                                    <li theme="azure"><div>天蓝</div></li>
                            </ul>
                    </div>

                    <!-- navMenu -->

            </div>

            <div id="leftside">
                <div id="sidebar_s">
                    <div class="collapse">
                        <div class="toggleCollapse"><div></div></div>
                    </div>
                </div>
                <div id="sidebar">
                    <div class="toggleCollapse"><h2>主菜单</h2><div>收缩</div></div>

                    <div class="accordion" fillSpace="sidebar">
                        <?php foreach (MenuHelper::getAssignedMenu(\Yii::$app->user->id) as $p_menu) { ?>
                            <div class="accordionHeader">
                            <h2><span>Folder</span><?=$p_menu['label']?></h2>
                            </div>
                            <div class="accordionContent">
                                <ul class="tree treeFolder">
                                    <?php foreach ($p_menu['items'] as $c_menu) {?>
                                    <li><a href="#"><?=$c_menu['label']?></a>
                                        <ul>
                                            <?php foreach ($c_menu['items'] as $s_menu) {?>
                                            <li><a href="<?=$s_menu['url'][0]?>" target="navTab" rel="<?=$s_menu['label']?>" external="true"><?=$s_menu['label']?></a></li>
                                            <?php }?>
                                        </ul>
                                    </li>
                                    <?php }?>
                                </ul>
                            </div>
                        <?php }?>
                    </div>
                </div>
            </div>
            <div id="container" >
                <div id="navTab" class="tabsPage">
                    <div class="tabsPageHeader">
                        <div class="tabsPageHeaderContent"><!-- 显示左右控制时添加 class="tabsPageHeaderMargin" -->
                            <ul class="navTab-tab">
                                <li tabid="main" class="main"><a href="javascript:void(0);"><span><span class="home_icon">我的主页</span></span></a></li>
                            </ul>
                        </div>
                        <div class="tabsLeft">left</div><!-- 禁用只需要添加一个样式 class="tabsLeft tabsLeftDisabled" -->
                        <div class="tabsRight">right</div><!-- 禁用只需要添加一个样式 class="tabsRight tabsRightDisabled" -->
                        <div class="tabsMore">more</div>
                    </div>
                    <ul class="tabsMoreList">
                        <li><a href="javascript:void(0);">我的主页</a></li>
                    </ul>
                    <div class="navTab-panel tabsPageContent layoutBox">
                        <div class="page unitBox">
                            <div class="accountInfo" style="line-height: 60px;text-align: center;">
                                海威后台管理
                            </div>
			

                        </div>
                    </div>
                </div>
            </div>
	</div>
    <div id="footer">Copyright &copy; <?php echo date("Y",time());?> <a href="#" target="dialog">海威</a></div>

</body>
</html>
